$enchants = {
	1128 => {id => 1128, int => 25},
	2332 => {id => 2332, splpwr => 30},
	3232 => {id => 3232, sta => 15},
	3244 => {id => 3244},
	3246 => {id => 3246, splpwr => 28},
	3719 => {id => 3719, splpwr => 50, spi => 20},
	3721 => {id => 3721, splpwr => 50, sta => 30},
	3758 => {id => 3758, splpwr => 76},
	3809 => {id => 3809, int => 21, spi => 16},
	3810 => {id => 3810, splpwr => 24, critstrkrtng => 15},
	3819 => {id => 3819, int => 26, spi => 20},
	3820 => {id => 3820, splpwr => 30, critstrkrtng => 20},
	3826 => {id => 3826, hitrtng => 12, critstrkrtng => 12},
	3831 => {id => 3831, hastertng => 23},
	3832 => {id => 3832, agi => 10, int => 10, spi => 10, sta => 10, str => 10},
	3834 => {id => 3834, splpwr => 63},
	3836 => {id => 3836, int => 60, spi => 15},
	3838 => {id => 3838, splpwr => 70, critstrkrtng => 15},
	3840 => {id => 3840, splpwr => 23},
	3854 => {id => 3854, splpwr => 81},
	4061 => {id => 4061, mastrtng => 50},
	4062 => {id => 4062, sta => 30},
	4063 => {id => 4063, agi => 15, int => 15, spi => 15, sta => 15, str => 15},
	4065 => {id => 4065, hastertng => 50},
	4068 => {id => 4068, hastertng => 50},
	4069 => {id => 4069, hastertng => 50},
	4071 => {id => 4071, critstrkrtng => 50},
	4072 => {id => 4072, int => 30},
	4179 => {id => 4179},	# Engineertinker: Synapse Springs, 480 int for 12 seconds, 60sec cd #4.0.6: duration -> 10 sec
	4080 => {id => 4080, int => 40},
	4083 => {id => 4083},	# Hurricane, 450 haste for 12 sec, 60 sec cd, 12.5% chance
	4084 => {id => 4084},	# Heartsong, 200 spirit 
	4087 => {id => 4087, critstrkrtng => 50},
	4088 => {id => 4088, spi => 40},
	4089 => {id => 4089, hitrtng => 50},
	4091 => {id => 4091, int => 100},	#4.0.6: int => 40
	4092 => {id => 4092, hitrtng => 50},
	4093 => {id => 4093, spi => 50},
	4094 => {id => 4094, mastrtng => 50},
	4096 => {id => 4096, int => 50},
	4097 => {id => 4097},	# Power Torrent 500 int 
	4100 => {id => 4100, critstrkrtng => 65},
	4101 => {id => 4101, critstrkrtng => 65},
	4102 => {id => 4102, agi => 20, int => 20, spi => 20, sta => 20, str => 20},
	4107 => {id => 4107, mastrtng => 65},
	4108 => {id => 4108, hastertng => 65},
	4109 => {id => 4109, int => 55, spi => 45},
	4110 => {id => 4110, int => 95, spi => 55},
	4111 => {id => 4111, int => 55, sta => 65},
	4112 => {id => 4112, int => 95, sta => 80},
	4188 => {id => 4188 },	# Engineer tinker: some kind of shield, not relevant in terms of dps
	4196 => {id => 4196, int => 130, hastertng => 25},
	4200 => {id => 4200, int => 50, hastertng => 25},
	4207 => {id => 4207, int => 60, critstrkrtng => 35},
};

$randomenchants = {
	63496 => {	# Lightning Well Belt (normal)
		-212 => {
			name => "Lightning Well Belt of the Fireflash",
			sta => 380,
			int => 232,
			hastertng => 160,
			critstrkrtng => 160,
		},
		-213 => {
			name => "Lightning Well Belt of the Feverflare",
			sta => 380,
			int => 232,
			hastertng => 160,
			mastrtng => 160,
		},
		-214 => {
			name => "Lightning Well Belt of the Undertow",
			sta => 380,
			int => 232,
			hastertng => 160,
			spi => 160,
		},
		-215 => {
			name => "Lightning Well Belt of the Wavecrest",
			sta => 380,
			int => 232,
			mastrtng => 160,
			spi => 160,
		},
	},
	63505 => {	# Lightning Well Legguards (normal)
		-185 => {
			name => "Lightning Well Legguards of the Fireflash",
			sta => 511,
			int => 301,
			hastertng => 208,
			critstrkrtng => 208,
		},
		-186 => {
			name => "Lightning Well Legguards of the Feverflare",
			sta => 511,
			int => 301,
			hastertng => 208,
			mastrtng => 208,
		},
		-187 => {
			name => "Lightning Well Legguards of the Undertow",
			sta => 511,
			int => 301,
			hastertng => 208,
			spi => 208,
		},
		-188 => {
			name => "Lightning Well Legguards of the Wavecrest",
			sta => 511,
			int => 301,
			mastrtng => 208,
			spi => 208,
		},
	},
	63494 => {	# Planetary Band (normal)
		-114 => {
			name => "Planetary Band of the Flameblaze",
			sta => 285,
			int => 190,
			mastrtng => 126,
			hitrtng => 126,
		},
		-131 => {
			name => "Planetary Band of the Undertow",
			sta => 285,
			int => 285,
			hastertng => 126,
			spi => 126,
		},
		-138 => {
			name => "Planetary Band of the Feverflare",
			sta => 285,
			int => 190,
			mastrtng => 126,
			hastertng => 126,
		},
		# ??? => {
			# name => "Planetary Band of the Wildfire",
			# sta => 285,
			# int => 190,
			# critstrkrtng => 126,
			# hitrtng => 126,
		# },
		# ??? => {
			# name => "Planetary Band of the Fireflash",
			# sta => 285,
			# int => 190,
			# critstrkrtng => 126,
			# hastertng => 126,
		# },
		# ??? => {
			# name => "Planetary Band of the Wavecrest",
			# sta => 285,
			# int => 190,
			# mastrtng => 126,
			# spi => 126,
		# },
	},
	65377 => {	# Lightning Well Belt (heroic)
		-229 => {
			name => "Lightning Well Belt of the Fireflash",
			sta => 429,
			int => 266,
			hastertng => 180,
			critstrkrtng => 180,
		},
		-230 => {
			name => "Lightning Well Belt of the Feverflare",
			sta => 429,
			int => 266,
			hastertng => 180,
			mastrtng => 180,
		},
		-231 => {
			name => "Lightning Well Belt of the Undertow",
			sta => 429,
			int => 266,
			hastertng => 180,
			spi => 180,
		},
		-232 => {
			name => "Lightning Well Belt of the Wavecrest",
			sta => 429,
			int => 266,
			mastrtng => 180,
			spi => 180,
		},
	},
	65386 => {	# Lightning Well Legguards (Heroic)
		# ??? => {
			# name => "Lightning Well Legguards of the Fireflash",
			# sta => 578,
			# int => 345,
			# hastertng => 238,
			# critstrkrtng => 238,
		# },
		# ??? => {
			# name => "Lightning Well Legguards of the Feverflare",
			# sta => 578,
			# int => 345,
			# hastertng => 238,
			# mastrtng => 238,
		# },
		# ??? => {
			# name => "Lightning Well Legguards of the Undertow",
			# sta => 578,
			# int => 345,
			# hastertng => 238,
			# spi => 238,
		# },
		# ??? => {
			# name => "Lightning Well Legguards of the Wavecrest",
			# sta => 578,
			# int => 345,
			# mastrtng => 238,
			# spi => 238,
		# },
	},
	65373 => {	#Planetary Band (heroic)
		# ??? => {
			# name => "Planetary Band of the Flameblaze",
			# sta => 321,
			# int => 214,
			# mastrtng => 143,
			# hitrtng => 143,
		# },
		# ??? => {
			# name => "Planetary Band of the Undertow",
			# sta => 321,
			# int => 214,
			# hastertng => 143,
			# spi => 143,
		# },
		# ??? => {
			# name => "Planetary Band of the Feverflare",
			# sta => 321,
			# int => 214,
			# mastrtng => 143,
			# hastertng => 143,
		# },
		-129 => {
			name => "Planetary Band of the Wildfire",
			sta => 321,
			int => 214,
			critstrkrtng => 143,
			hitrtng => 143,
		},
		# ??? => {
			# name => "Planetary Band of the Fireflash",
			# sta => 321,
			# int => 214,
			# critstrkrtng => 143,
			# hastertng => 143,
		# },
		# ??? => {
			# name => "Planetary Band of the Wavecrest",
			# sta => 321,
			# int => 214,
			# mastrtng => 143,
			# spi => 143,
		# },
	},
};

##########
#
#	Enchant Proccs
#
##########
#Hurricane
$buff->{74221} = {
				name => "Hurricane",
				lasts => 12,
				fallsoff => 0,
				cd => 60,
				offcd => 0,
				chance => 0.125,
				upsince => 0,
				uptime => 0,
			};
$ocf{4083} = sub {
	if ($buff->{74221}->{offcd} < $now) {
		$roll = rand;
		if ($roll < $buff->{74221}->{chance}) {
			clog(sprintf("%.4f: SPELL_AURA_APPLIED: Hurricane\n", $now));
			$buff->{74221}->{fallsoff} = sprintf("%.4f", $now + $buff->{74221}->{lasts});
			$buff->{74221}->{offcd} = sprintf("%.4f", $now + $buff->{74221}->{cd});
			$buff->{74221}->{upsince} = $now;
			$event = [$buff->{74221}->{fallsoff}, $fa74221];
			push(@queue, $event);
			$buff_haste += 450;
			calcStatsDamage();
		}
	}
};
$fa74221 = sub {
	clog(sprintf("%.4f: SPELL_AURA_REMOVED: Hurricane\n", $now));
	$buff->{74221}->{uptime} += sprintf("%.4f", $now - $buff->{74221}->{upsince});
	$buff_haste -= 450;
	calcStatsDamage();
};
#Power Torrent
$buff->{74242} = {
				name => "Power Torrent",
				lasts => 12,
				fallsoff => 0,
				cd => 60,
				offcd => 0,
				chance => 0.33,
				upsince => 0,
				uptime => 0,
			};
$od{4097} = sub {
	if ($buff->{74242}->{offcd} < $now) {
		$roll = rand;
		if ($roll < $buff->{74242}->{chance}) {
			clog(sprintf("%.4f: SPELL_AURA_APPLIED: Power Torrent\n", $now));
			$buff->{74242}->{fallsoff} = sprintf("%.4f", $now + $buff->{74242}->{lasts});
			$buff->{74242}->{offcd} = sprintf("%.4f", $now + $buff->{74242}->{cd});
			$buff->{74242}->{upsince} = $now;
			$event = [$buff->{74242}->{fallsoff}, $fa74242];
			push(@queue, $event);
			#$buff_sp += 500 * 1.05 * (1 + $mailspec * 0.05);
			$buff_int += 500;
			calcStatsDamage();
		}
	}
};
$fa74242 = sub {
	clog(sprintf("%.4f: SPELL_AURA_REMOVED: Power Torrent\n", $now));
	$buff->{74242}->{uptime} += sprintf("%.4f", $now - $buff->{74242}->{upsince});
	#$buff_sp -= 500 * 1.05 * (1 + $mailspec * 0.05);
	$buff_int -= 500;
	calcStatsDamage();
};
#Synapse Springs
$buff->{82174} = {
				name => "Synapse Springs",
				lasts => 12,
				fallsoff => 0,
				cd => 60,
				offcd => 0,
				upsince => 0,
				uptime => 0,
			};
$oc{4179} =  sub {
	if ($buff->{82174}->{offcd} < $now) {
		clog(sprintf("%.4f: SPELL_AURA_APPLIED: Synapse Springs\n", $now));
		$buff->{82174}->{fallsoff} = sprintf("%.4f", $now + $buff->{82174}->{lasts});
		$buff->{82174}->{offcd} = sprintf("%.4f", $now + $buff->{82174}->{cd});
		$buff->{82174}->{upsince} = $now;
		$event = [$buff->{82174}->{fallsoff}, $fa82174];
		push(@queue, $event);
		$buff_int += 480;
		calcStatsDamage();
	}
};
$fa82174 = sub {
	clog(sprintf("%.4f: SPELL_AURA_REMOVED: Synapse Springs\n", $now));
	$buff->{82174}->{uptime} += sprintf("%.4f", $now - $buff->{82174}->{upsince});
	$buff_int -= 480;
	calcStatsDamage();
};